package inventario.grafica;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

import com.cloudgarden.resource.SWTResourceManager;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class CadastraPessoa extends org.eclipse.swt.widgets.Composite {
	private Text cadastraPessoa;
	private Button voltar;
	private Combo salas;
	private Text text2;
	private Text text3;
	private Text email;
	private Text login;
	private Button ok;
	private Text nome;
	private Text text1;
	private Text novaPessoa;

	{
		//Register as a resource user - SWTResourceManager will
		//handle the obtaining and disposing of resources
		SWTResourceManager.registerResourceUser(this);
	}

	public CadastraPessoa(Composite parent, int style) {
		super(parent, style);
		initGUI();
	}
	
	/**
	* Initializes the GUI.
	*/
	private void initGUI() {
		try {
			
			this.setSize(612, 461);
			this.setBackground(SWTResourceManager.getColor(172, 203, 158));
			FormLayout thisLayout = new FormLayout();
			this.setLayout(thisLayout);
			{
				FormData salasLData = new FormData();
				salasLData.left =  new FormAttachment(0, 1000, 157);
				salasLData.top =  new FormAttachment(0, 1000, 238);
				salasLData.width = 110;
				salasLData.height = 23;
				salas = new Combo(this, SWT.NONE);
				salas.setLayoutData(salasLData);
				salas.setText(".: Escolha a Sala :.");
			}
			{
				FormData loginLData = new FormData();
				loginLData.left =  new FormAttachment(0, 1000, 159);
				loginLData.top =  new FormAttachment(0, 1000, 161);
				loginLData.width = 320;
				loginLData.height = 20;
				login = new Text(this, SWT.NONE);
				login.setLayoutData(loginLData);
			}
			{
				FormData text1LData = new FormData();
				text1LData.left =  new FormAttachment(0, 1000, 159);
				text1LData.top =  new FormAttachment(0, 1000, 122);
				text1LData.width = 320;
				text1LData.height = 20;
				text1 = new Text(this, SWT.MULTI | SWT.WRAP);
				text1.setLayoutData(text1LData);
			}
			{
				voltar = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData voltarLData = new FormData();
				voltarLData.left =  new FormAttachment(0, 1000, 213);
				voltarLData.top =  new FormAttachment(0, 1000, 410);
				voltarLData.width = 50;
				voltarLData.height = 25;
				voltar.setLayoutData(voltarLData);
				voltar.setText("Voltar");
				voltar.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				ok = new Button(this, SWT.PUSH | SWT.CENTER);
				FormData okLData = new FormData();
				okLData.left =  new FormAttachment(0, 1000, 300);
				okLData.top =  new FormAttachment(0, 1000, 410);
				okLData.width = 103;
				okLData.height = 25;
				ok.setLayoutData(okLData);
				ok.setText("Cadastrar Pessoa");
				ok.setBackground(SWTResourceManager.getColor(172, 203, 158));
			}
			{
				nome = new Text(this, SWT.NONE);
				FormData nomeLData = new FormData();
				nomeLData.left =  new FormAttachment(0, 1000, 102);
				nomeLData.top =  new FormAttachment(0, 1000, 122);
				nomeLData.width = 38;
				nomeLData.height = 21;
				nome.setLayoutData(nomeLData);
				nome.setText("Nome");
				nome.setBackground(SWTResourceManager.getColor(172, 203, 158));
				nome.setFont(SWTResourceManager.getFont("Segoe UI Semibold", 10, 0, false, false));
				nome.setEditable(false);
				nome.setEnabled(false);
			}
			
			{
				novaPessoa = new Text(this, SWT.NONE);
				FormData novaPessoaLData = new FormData();
				novaPessoaLData.left =  new FormAttachment(0, 1000, 121);
				novaPessoaLData.top =  new FormAttachment(0, 1000, 85);
				novaPessoaLData.width = 90;
				novaPessoaLData.height = 20;
				novaPessoa.setLayoutData(novaPessoaLData);
				novaPessoa.setText("Nova Pessoa");
				novaPessoa.setBackground(SWTResourceManager.getColor(172, 203, 158));
				novaPessoa.setEditable(false);
				novaPessoa.setEnabled(false);
				novaPessoa.setFont(SWTResourceManager.getFont("Segoe UI", 10, 0, false, false));
			}
			{
				cadastraPessoa = new Text(this, SWT.NONE);
				FormData cadastraPessoaLData = new FormData();
				cadastraPessoaLData.left =  new FormAttachment(0, 1000, 73);
				cadastraPessoaLData.top =  new FormAttachment(0, 1000, 39);
				cadastraPessoaLData.width = 125;
				cadastraPessoaLData.height = 24;
				cadastraPessoa.setLayoutData(cadastraPessoaLData);
				cadastraPessoa.setText("Cadastrar Pessoa");
				cadastraPessoa.setBackground(SWTResourceManager.getColor(172, 203, 158));
				cadastraPessoa.setFont(SWTResourceManager.getFont("Segoe UI Semibold", 12, 0, false, false));
			}
			{
				login = new Text(this, SWT.NONE);
				login.setText("Login");
				login.setFont(SWTResourceManager.getFont("Segoe UI Semibold",10,0,false,false));
				FormData loginLData = new FormData();
				loginLData.left =  new FormAttachment(0, 1000, 106);
				loginLData.top =  new FormAttachment(0, 1000, 161);
				loginLData.width = 31;
				loginLData.height = 21;
				login.setLayoutData(loginLData);
				login.setEditable(false);
				login.setBackground(SWTResourceManager.getColor(172,203,158));
				login.setEnabled(false);
			}
			{
				email = new Text(this, SWT.NONE);
				email.setText("Email");
				email.setFont(SWTResourceManager.getFont("Segoe UI Semibold",10,0,false,false));
				FormData emailLData = new FormData();
				emailLData.left =  new FormAttachment(0, 1000, 106);
				emailLData.top =  new FormAttachment(0, 1000, 201);
				emailLData.width = 31;
				emailLData.height = 21;
				email.setLayoutData(emailLData);
				email.setEditable(false);
				email.setBackground(SWTResourceManager.getColor(172,203,158));
				email.setEnabled(false);
			}
			{
				FormData text3LData = new FormData();
				text3LData.left =  new FormAttachment(0, 1000, 158);
				text3LData.top =  new FormAttachment(0, 1000, 199);
				text3LData.width = 320;
				text3LData.height = 20;
				text3 = new Text(this, SWT.NONE);
				text3.setLayoutData(text3LData);
			}
			{
				text2 = new Text(this, SWT.NONE);
				text2.setText("Sala");
				text2.setFont(SWTResourceManager.getFont("Segoe UI Semibold",10,0,false,false));
				FormData text2LData = new FormData();
				text2LData.left =  new FormAttachment(0, 1000, 113);
				text2LData.top =  new FormAttachment(0, 1000, 241);
				text2LData.width = 24;
				text2LData.height = 21;
				text2.setLayoutData(text2LData);
				text2.setEditable(false);
				text2.setBackground(SWTResourceManager.getColor(172,203,158));
				text2.setEnabled(false);
			}
			this.layout();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	/**
	* Auto-generated main method to display this 
	* org.eclipse.swt.widgets.Composite inside a new Shell.
	*/
	public static void main(String[] args) {
		Display display = Display.getDefault();
		Shell shell = new Shell(display);
		CadastraPessoa inst = new CadastraPessoa(shell, SWT.NULL);
		Point size = inst.getSize();
		shell.setLayout(new FillLayout());
		shell.layout();
		if(size.x == 0 && size.y == 0) {
			inst.pack();
			shell.pack();
		} else {
			Rectangle shellBounds = shell.computeTrim(0, 0, size.x, size.y);
			shell.setSize(shellBounds.width, shellBounds.height);
		}
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
	}

}
